
package com.android.fitnesscenter.utils;

import android.text.TextUtils;

public class ConfigProperties {

    public static final String FILE_APK_PATH = "com.android.fitnesscenter.apk";

    public static final String SHARE_PREFS = "com.android.fitnesscenter";

    public static final String FILE_PATH = "com.android.fitnesscenter";

    public static final String DATABASE_NAME = "com.android.fitnesscenter.db";

    public static final String FILE_NAME = "com_android_fitnesscenter_crash";

    public static final String SERVICE_URL =
            // "http://192.168.1.104:8080/gym/index/";
            // "http://xgym.sinaapp.com/index/";
            "http://192.168.1.5:8080/gym/index/";

    public static final int APP_TYPE = RoleInfo.SERVER;

    public interface RoleInfo {
        public static final int CLIENT = 0;
        public static final int SERVER = 1;
    }

    public interface RoleType {
        public static final String USER = "0"; // 0 普通用户
        public static final String MANAGER = "1"; // 1 管理员
        public static final String OPREATER = "2"; // 2 操作员
        public static final String CHECKER = "3"; // 3 审计员
    }

    public static String getRoleStr(String roleId) {
        String roleStr = "用户";
        if (TextUtils.equals(RoleType.USER, roleId)) {
            roleStr = "用户";
        } else if (TextUtils.equals(RoleType.MANAGER, roleId)) {
            roleStr = "管理员";
        } else if (TextUtils.equals(RoleType.CHECKER, roleId)) {
            roleStr = "审计员";
        } else if (TextUtils.equals(RoleType.OPREATER, roleId)) {
            roleStr = "操作员";
        }
        return roleStr;
    }

    public interface TradingType {
        public static final String TOP_UP = "0"; // 0 - 充值
        public static final String PAY = "1"; // 1 - 缴费
    }

    public static String getTradingType(String type) {
        if (TextUtils.equals(type, "充值")) {
            type = TradingType.TOP_UP;
        } else if (TextUtils.equals(type, "缴费")) {
            type = TradingType.PAY;
        } else {
            type = "";
        }
        return type;
    }

    public static String getType(String type) {
        if (TextUtils.equals(TradingType.TOP_UP, type)) {
            return "充值";
        } else {
            return "缴费";
        }

    }

    public interface TradingEntity {
        public static final int ID = 0;
        public static final int MONEY = 1;
        public static final int STATUS = 2;
        public static final int TYPE = 3;
        public static final int YUE = 4;
    }

    public interface QueryDetailResult {
        public static final int COMPLETE_TIME = 0;
        public static final int CREATE_TIME = 1;
        public static final int EXT_CNAME = 2;
        public static final int EXT_USER = 3;
        public static final int ID = 4;
        public static final int MONEY = 5;
        public static final int STATUS = 6;
        public static final int TYPE = 7;
        public static final int USER_NAME = 8;

        public static final String COMPLETE_TIME_STR = "completeTime";
        public static final String CREATE_TIME_STR = "createTime";
        public static final String EXT_CNAME_STR = "exeCname";
        public static final String EXT_USER_STR = "exeUser";
        public static final String ID_STR = "id";
        public static final String MONEY_STR = "money";
        public static final String STATUS_STR = "status";
        public static final String TYPE_STR = "type";
        public static final String USER_NAME_STR = "username";
    }

    public interface AuditListResult {
        public static final String CHECKED_STR = "checked";
        public static final String CREATE_TIME_STR = "createTime";
        public static final String ERROR_TIMES_STR = "errorTimes";
        public static final String FIRST_LOGIN_STR = "firstLogin";
        public static final String ID_STR = "id";
        public static final String LOCKED_STR = "locked";
        public static final String LOCKED_TIME_STR = "lockedTime";
        public static final String LOGIN_NAME_STR = "loginName";
        public static final String LOGIN_TIME_STR = "loginTime";
        public static final String MAC_STR = "mac";
        public static final String PASSWORD_STR = "password";
        public static final String QX1_STR = "qx1";
        public static final String QX2_STR = "qx2";
        public static final String QX3_STR = "qx3";
        public static final String QX4_STR = "qx4";
        public static final String QX5_STR = "qx5";
        public static final String ROLE_ID_STR = "roleId";
        public static final String UUID_STR = "uuid";

        public static final int CHECKED = 0;
        public static final int CREATE_TIME = 1;
        public static final int ERROR_TIMES = 2;
        public static final int FIRST_LOGIN = 3;
        public static final int ID = 4;
        public static final int LOCKED = 5;
        public static final int LOCKED_TIME = 6;
        public static final int LOGIN_NAME = 7;
        public static final int LOGIN_TIME = 8;
        public static final int MAC = 9;
        public static final int PASSWORD = 10;
        public static final int QX1 = 11;
        public static final int QX2 = 12;
        public static final int QX3 = 13;
        public static final int QX4 = 14;
        public static final int QX5 = 15;
        public static final int ROLE_ID = 16;
        public static final int UUID = 17;

    }

    public interface CheckListType {
        public static final int CREATE_TIME = 0;
        public static final int ID = 1;
        public static final int NAME = 2;
        public static final int USER_NAME = 3;

        public static final String CREATE_TIME_STR = "createTime";
        public static final String ID_STR = "id";
        public static final String NAME_STR = "name";
        public static final String USER_NAME_STR = "username";

    }

}
